/**
 * 
 */
package org.cuny.util;

/**
 * @author di.wd
 *
 */
public class StringUtil
{

	/**
	 * @param sourceString
	 * @param delim
	 * @return
	 */
	public final static String[] separateString( String sourceString, String delim )
	{
		if ( null == sourceString || null == delim )
		{
			return new String[ 0 ];
		}
		
		return sourceString.split( delim );
	}
	
	/**
	 * @param args
	 */
	public static void main( String[] args )
	{
		String[] datas = StringUtil.separateString( "84 57 54 53 51 51 50 49 49 49", " " );
		int length = datas.length;
		for ( int i = 0; i < length; i++ )
		{
			System.out.println( datas[ i ] );
		}
	}

}
